package cnpm02.j2ee.group3.logic.dao.impl;

import java.util.List;

import cnpm02.j2ee.group3.logic.dao.generic.AbstractEntityDao;
import cnpm02.j2ee.group3.model.Flight;

public interface FlightDao extends AbstractEntityDao<Flight> {
	final String SELECT_ALL_QUERY = "from Flight";
	final String SELECT_NEW_FLIGHT = "from Flight f where f.status = 'normal' and f.departDate >= :now";
	final String SELECT_EXPIRED_FLIGHT = "from Flight f where f.departDate < :now";
	final String SELECT_CANCELLED_FLIGHT = "from Flight f where f.status = 'cancelled'";
	
	List<Flight> selectNewFlight();
	List<Flight> selectExpiredFlight();
	List<Flight> selectCancelledFlight();
	void flush();
}
